<ui:composition template="/WEB-INF/templates/main-template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="sidebar">
		<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
	</ui:define>
	<ui:define name="content">
		<h:form id="formData">
		<p:growl id="growl"></p:growl>
			 <h:outputText value="#{msg['viewupdateinternationalprojectassignment.lable.heading']}" styleClass="outputTextTitle" style="font-weight: bold; color: #7892B7"/>
			<!-- VIEW/EDIT PROJECT ASSIGNMENT FORM -->
		
	
			
		
			<h:panelGrid  style="border: 1px solid #d9d9d9; width: 100%; padding-bottom: 20px;">
				
				 <p:panel  header="#{msg['employeedetails.label']}" style="border: 1px solid #d9d9d9; width:100%"> 
			
			<h:panelGrid columns="9" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="border: 1px solid #d9d9d9; background-color: #FFE4C4;  border: 1px solid #F5AD66; width:100%" cellspacing="3">
				<h:outputLabel value="#{msg['projectassignmentid.lable']}"/>
				<h:outputLabel value=" : " />
				<p:inputText value="#{editViewInternationalProjectAssignmentBean.projectAssignmentCode}" readonly="true"/>
				<h:outputLabel value="#{msg['createdate.label']}"/>
				<h:outputLabel value=" : " />
				<p:calendar pattern="dd/MM/yyy" value="#{editViewInternationalProjectAssignmentBean.createDate}"  showButtonPanel="true"/>	 	
				<h:outputLabel value="#{msg['employeeid.label']}"/>
				<h:outputLabel value=" : " />
				<p:inputText  value="#{editViewInternationalProjectAssignmentBean.employeeId}" readonly="true"/>
			   
			    <h:outputLabel value="#{msg['employeename.label']}"/>
			    <h:outputLabel value=" : " />
				<p:inputText value="#{editViewInternationalProjectAssignmentBean.employee.firstName} #{editViewInternationalProjectAssignmentBean.employee.lastName} "  readonly="true"/>
				<h:outputLabel value="#{msg['contactnumber.label']}"/>
				<h:outputLabel value=" : " />
				<p:inputText value="#{editViewInternationalProjectAssignmentBean.contactNumber}" readonly="true" />
				<h:outputLabel value="#{msg['emergenceycontactnum.label']}"/>
				<h:outputLabel value=" : " />
				<p:inputMask value="#{editViewInternationalProjectAssignmentBean.projectAssignment.emergencycontactNumber}" mask="(999) 999-9999"/>
				
				<h:outputLabel value="#{msg['passportnumber.label']}"/>
				<h:outputLabel value=" : " />
				<p:inputText  value="#{editViewInternationalProjectAssignmentBean.passportNumber}"/>
				<h:outputLabel value="#{msg['approvedby.lable']}"/>
				<h:outputLabel value=" : " />
				<p:inputText value="#{editViewInternationalProjectAssignmentBean.approvedBy}" readonly="true"/>
				</h:panelGrid>
			    </p:panel>
			    <p:panel header="#{msg['assignmentdetails.label']}" style="border: 1px solid #d9d9d9; width:100%">
			    <h:panelGrid columns="9" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">
			
				 <h:panelGroup>
					<h:outputLabel value="*" style="color : red;" />
					<h:outputText value="Choose Project" />
					</h:panelGroup>
				 <h:outputLabel value=" : " />
					<p:selectOneMenu value="#{editViewInternationalProjectAssignmentBean.projectAssignment.project.projectId}" style="width:160px;">
					<f:selectItems value="#{editViewInternationalProjectAssignmentBean.projectsMap}" />
					<p:ajax event="change" listener="#{editViewInternationalProjectAssignmentBean.projectChangeListener}" update="projectName,clientAddress,client,clientLocation,contactPerson,contactNumber,periodFrom,periodTo,recommendedBy"/>
					</p:selectOneMenu>
				<h:outputLabel value="#{msg['recommendedby.lable']}"/>
				<h:outputLabel value=" : " />
				<p:inputText id="recommendedBy" value="#{editViewInternationalProjectAssignmentBean.projectAssignment.project.owner.firstName} #{editViewInternationalProjectAssignmentBean.projectAssignment.project.owner.lastName}" readonly="true" />
				<h:outputLabel value="#{msg['projectname.label']}"/>
				<h:outputLabel value=" : " />
				<p:inputText id="projectName" value="#{editViewInternationalProjectAssignmentBean.projectAssignment.project.projectName}" readonly="true"/>
				<h:panelGroup>
		<p:spacer></p:spacer>
		<p:spacer></p:spacer>
		<h:outputLabel value="#{msg['clientaddress.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText id="clientAddress" value="#{editViewInternationalProjectAssignmentBean.projectAssignment.project.clientAddress}" readonly="true" />
				<h:outputLabel value="#{msg['clientname.label']}"/>
				<h:outputLabel value=" : " />
				<p:inputText  id="client" value="#{editViewInternationalProjectAssignmentBean.projectAssignment.project.client}" readonly="true"/>
				<h:outputLabel value="#{msg['clientlocation.label']}"/>
				<h:outputLabel value=" : " />
				<p:inputText  id="clientLocation" value="#{editViewInternationalProjectAssignmentBean.projectAssignment.project.clientLocation}" readonly="true"/> 
				<h:panelGroup>
		<p:spacer></p:spacer>
		<p:spacer></p:spacer>
		<h:outputLabel value="#{msg['clientcontactperson.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText id="contactPerson" value="#{editViewInternationalProjectAssignmentBean.projectAssignment.project.contactPerson}" readonly="true" />
				<h:outputLabel value="#{msg['clientcontactnumber.lable']}"/>
				<h:outputLabel value=" : " />
				<p:inputText id="contactNumber" value="#{editViewInternationalProjectAssignmentBean.projectAssignment.project.contactNumber}"  readonly="true"/>
				<h:outputLabel value="#{msg['projectstratdate.label']}"/>
				<h:outputLabel value=" : " />
				<p:calendar id="periodFrom" value="#{editViewInternationalProjectAssignmentBean.projectAssignment.project.periodFrom}"/>
				<h:panelGroup>
		<p:spacer></p:spacer>
		<p:spacer></p:spacer>
		<h:outputLabel value="#{msg['projectenddate.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
			    <p:calendar id="periodTo" value="#{editViewInternationalProjectAssignmentBean.projectAssignment.project.periodTo}"/>
				</h:panelGrid>
			    </p:panel> 
			   <p:panel header="#{msg['particularsoftravelonwardjourney.label']}" style="border: 1px solid #d9d9d9; width:100%">  
       <h:panelGrid columns="9" id="particularsoftravelonwardjourney" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">   
                <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputLabel value="#{msg['modeoftravel.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:selectOneMenu value="#{editViewInternationalProjectAssignmentBean.onwardJourney.modeOfTravel}" style="width:160px;">
						<f:selectItem itemLabel="Choose One" itemValue="Choose One" />
						<f:selectItem itemLabel="Air" itemValue="Air" />
						<f:selectItem itemLabel="Train" itemValue="Train" />
						<f:selectItem itemLabel="Bus" itemValue="Bus" />
						<f:selectItem itemLabel="Taxi" itemValue="Taxi" />
				</p:selectOneMenu>
				
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputLabel value="#{msg['nameofcarrier.label']}"/>
		</h:panelGroup>
	
				<h:outputLabel value=" : " />
				<p:inputText  value="#{editViewInternationalProjectAssignmentBean.onwardJourney.nameOfCarrier}" />
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputLabel value="#{msg['carrierid.label']}" />
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText  value="#{editViewInternationalProjectAssignmentBean.onwardJourney.carrierId}" />
				 <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputLabel value="#{msg['from.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText  value="#{editViewInternationalProjectAssignmentBean.onwardJourney.source}" />
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputLabel value="#{msg['to.label']}"/>

		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText  value="#{editViewInternationalProjectAssignmentBean.onwardJourney.destination}" />
				 <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputLabel value="#{msg['departuredate.label']}"/>

		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:calendar pattern="dd/MM/yyy" showButtonPanel="true" value="#{editViewInternationalProjectAssignmentBean.onwardJourney.departureDate}" />
				 <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputLabel value="#{msg['departuretime.label']}"/>

		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:calendar  pattern="HH:mm" timeOnly="true" value="#{editViewInternationalProjectAssignmentBean.onwardJourney.departureTime}" />  
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
	<h:outputLabel value="#{msg['arrivaldate.label']}"/>

		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:calendar pattern="dd/MM/yyy" showButtonPanel="true" value="#{editViewInternationalProjectAssignmentBean.onwardJourney.arrivalDate}" />
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
	<h:outputLabel value="#{msg['arrivaltime.label']}"/>

		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:calendar  pattern="HH:mm" timeOnly="true" value="#{editViewInternationalProjectAssignmentBean.onwardJourney.arrivalTime}" />  
              
             <h:panelGrid columns="2">  
               <p:commandButton id="btn_add1" value="Add" action="#{editViewInternationalProjectAssignmentBean.reinitOnward}" process="@this"  
                update="onwardJourneyDetails growl @parent" ajax="false">
                  <p:collector value="#{editViewInternationalProjectAssignmentBean.onwardJourney}"   
                            addTo="#{editViewInternationalProjectAssignmentBean.onwardJourneyDetails}" />  
                </p:commandButton>
                <p:commandButton value="Reset" type="reset"/>  
            </h:panelGrid> 
        </h:panelGrid>  
    </p:panel>  
       <p:outputPanel id="onward">  
        <p:dataTable  id="onwardJourneyDataTable" value="#{editViewInternationalProjectAssignmentBean.onwardJourneyDetails}" var="onwardJourney" rowKey="#{onwardJourney.journeyId}" binding="#{editViewInternationalProjectAssignmentBean.availableOnwordJourneyDetailsTable}">  
         <!-- <p:ajax  event="rowEdit" update=":formData:growl,:formData:onwardJourneyDataTable"  listener="#{editViewInternationalProjectAssignmentBean.saveInternationalProjectAssignmentDetailOnward}" /> -->
        <p:column  headerText="#{msg['modeoftravel.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{onwardJourney.modeOfTravel}" />
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{onwardJourney.modeOfTravel}" style="width:100%"/>  
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
					
					  <p:column  headerText="#{msg['nameofcarrier.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{onwardJourney.nameOfCarrier}" />
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{onwardJourney.nameOfCarrier}" style="width:100%"/>  
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
					
					  <p:column  headerText="#{msg['carrierid.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{onwardJourney.carrierId}" />
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{onwardJourney.carrierId}" style="width:100%"/>  
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
					
						  <p:column  headerText="#{msg['from.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{onwardJourney.source}"  />
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{onwardJourney.source}"  style="width:100%"/>  
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
					
					  <p:column  headerText="#{msg['to.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{onwardJourney.destination}"  />
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{onwardJourney.destination}"  style="width:100%"/>  
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
					
					<p:column  headerText="#{msg['departuredate.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{onwardJourney.departureDate}"  >
		                    <f:convertDateTime pattern="dd/MM/yyy" timeZone="#{editViewInternationalProjectAssignmentBean.defaultTimeZone}"/>
                </h:outputText>
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{onwardJourney.departureDate}"  style="width:100%"> 
		                    <f:convertDateTime pattern="dd/MM/yyy" timeZone="#{editViewInternationalProjectAssignmentBean.defaultTimeZone}"/>
                             </h:inputText>
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
					
						<p:column  headerText="#{msg['departuretime.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{onwardJourney.departureTime}"  >
		                     <f:convertDateTime pattern="HH:mm" timeZone="#{editViewInternationalProjectAssignmentBean.defaultTimeZone}"/>
                </h:outputText> 
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{onwardJourney.departureTime}"  style="width:100%">  
		                     <f:convertDateTime pattern="HH:mm" timeZone="#{editViewInternationalProjectAssignmentBean.defaultTimeZone}"/>
              </h:inputText>
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
					
						<p:column  headerText="#{msg['arrivaldate.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{onwardJourney.arrivalDate}">
		                    <f:convertDateTime pattern="dd/MM/yyy" timeZone="#{editViewInternationalProjectAssignmentBean.defaultTimeZone}"/>
                </h:outputText>
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{onwardJourney.arrivalDate}"  style="width:100%">
		                    <f:convertDateTime pattern="dd/MM/yyy" timeZone="#{editViewInternationalProjectAssignmentBean.defaultTimeZone}"/>
                           </h:inputText> 
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
					
						<p:column  headerText="#{msg['arrivaltime.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{onwardJourney.arrivalTime}"  >
		                     <f:convertDateTime pattern="HH:mm" timeZone="#{editViewInternationalProjectAssignmentBean.defaultTimeZone}"/>
                </h:outputText> 
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{onwardJourney.arrivalTime}"  style="width:100%">  
		                     <f:convertDateTime pattern="HH:mm" timeZone="#{editViewInternationalProjectAssignmentBean.defaultTimeZone}"/>
                </h:inputText> 
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
								
			<p:column headerText="Operation">  
              <p:commandButton icon="ui-icon-close" title="Remove from list"
				actionListener="#{editViewInternationalProjectAssignmentBean.removeFromOnwardJourneyList}"
				update="@form" style="padding: 0"/>	
				
           </p:column>  
  
        </p:dataTable>  
    </p:outputPanel>
    <p:panel header="#{msg['particularsoftravelreturnjourney.label']}" style="border: 1px solid #d9d9d9; width:100%">  
     <h:panelGrid columns="9" id="particularsoftravelreturnjourney" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3"> 
                <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
	 <h:outputLabel value="#{msg['modeoftravel.label']}"/>

		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:selectOneMenu value="#{editViewInternationalProjectAssignmentBean.returnJourney.modeOfTravel}" style="width:160px;">
						<f:selectItem itemLabel="Choose One" itemValue="Choose One" />
						<f:selectItem itemLabel="Air" itemValue="Air" />
						<f:selectItem itemLabel="Train" itemValue="Train" />
						<f:selectItem itemLabel="Bus" itemValue="Bus" />
						<f:selectItem itemLabel="Taxi" itemValue="Taxi" />
				</p:selectOneMenu>
				
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
	<h:outputLabel value="#{msg['nameofcarrier.label']}"/>

		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText value="#{editViewInternationalProjectAssignmentBean.returnJourney.nameOfCarrier}"/>
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
	<h:outputLabel value="#{msg['carrierid.label']}"/>

		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText  value="#{editViewInternationalProjectAssignmentBean.returnJourney.carrierId}"/>
				 <h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
	<h:outputLabel value="#{msg['from.label']}"/>

		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText  value="#{editViewInternationalProjectAssignmentBean.returnJourney.source}"/>
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
	<h:outputLabel value="#{msg['to.label']}"/>

		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText  value="#{editViewInternationalProjectAssignmentBean.returnJourney.destination}"/>
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
<h:outputLabel value="#{msg['departuredate.label']}"/>

		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:calendar showButtonPanel="true" pattern="dd/MM/yyy" value="#{editViewInternationalProjectAssignmentBean.returnJourney.departureDate}"/>
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
<h:outputLabel value="#{msg['departuretime.label']}"/>

		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:calendar  pattern="HH:mm" timeOnly="true" value="#{editViewInternationalProjectAssignmentBean.returnJourney.departureTime}"/>  
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
<h:outputLabel value="#{msg['arrivaldate.label']}"/>

		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:calendar showButtonPanel="true" pattern="dd/MM/yyy" value="#{editViewInternationalProjectAssignmentBean.returnJourney.arrivalDate}"/>
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
<h:outputLabel value="#{msg['arrivaltime.label']}"/>

		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:calendar  pattern="HH:mm" timeOnly="true" value="#{editViewInternationalProjectAssignmentBean.returnJourney.arrivalTime}"/>
              <h:panelGrid columns="2">  
            
            <p:commandButton id="btn_add2" value="Add" action="#{editViewInternationalProjectAssignmentBean.reinitReturn}"  
                update="returnJourneyDetails growl @parent" ajax="false">
                  <p:collector value="#{editViewInternationalProjectAssignmentBean.returnJourney}"   
                            addTo="#{editViewInternationalProjectAssignmentBean.returnJourneyDetails}" />  
                </p:commandButton>
                <p:commandButton value="Reset" type="reset"/>  
            </h:panelGrid>  
        </h:panelGrid>  
    </p:panel> 
  <p:outputPanel id="return">  
        <p:dataTable  id="returnJourneyDataTable" value="#{editViewInternationalProjectAssignmentBean.returnJourneyDetails}" var="returnJourney" rowKey="#{returnJourney.journeyId}" binding="#{editViewInternationalProjectAssignmentBean.availableReturnJourneyDetailsTable}">
       <!-- <p:ajax  event="rowEdit" update=":formData:growl,:formData:returnJourneyDataTable"  listener="#{editViewInternationalProjectAssignmentBean.saveInternationalProjectAssignmentDetailReturn}" />  -->  
     <p:column  headerText="#{msg['modeoftravel.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{returnJourney.modeOfTravel}" />
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{returnJourney.modeOfTravel}" style="width:100%"/>  
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
					
					  <p:column  headerText="#{msg['nameofcarrier.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{returnJourney.nameOfCarrier}" />
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{returnJourney.nameOfCarrier}" style="width:100%"/>  
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
					
					  <p:column  headerText="#{msg['carrierid.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{returnJourney.carrierId}" />
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{returnJourney.carrierId}" style="width:100%"/>  
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
					
						  <p:column  headerText="#{msg['from.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{returnJourney.source}"  />
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{returnJourney.source}"  style="width:100%"/>  
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
					
					  <p:column  headerText="#{msg['to.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{returnJourney.destination}"  />
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{returnJourney.destination}"  style="width:100%"/>  
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
					
					<p:column  headerText="#{msg['departuredate.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{returnJourney.departureDate}"  >
		                    <f:convertDateTime pattern="dd/MM/yyy" timeZone="#{editViewInternationalProjectAssignmentBean.defaultTimeZone}"/>
                </h:outputText> 
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{returnJourney.departureDate}"  style="width:100%"> 
		                    <f:convertDateTime pattern="dd/MM/yyy" timeZone="#{editViewInternationalProjectAssignmentBean.defaultTimeZone}"/>
               </h:inputText>  
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
					
						<p:column  headerText="#{msg['departuretime.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{returnJourney.departureTime}"  >
		                           <f:convertDateTime pattern="HH:mm" timeZone="#{editViewInternationalProjectAssignmentBean.defaultTimeZone}"/>
                </h:outputText> 
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{returnJourney.departureTime}"  style="width:100%">
		                           <f:convertDateTime pattern="HH:mm" timeZone="#{editViewInternationalProjectAssignmentBean.defaultTimeZone}"/>
                </h:inputText>   
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
					
						<p:column  headerText="#{msg['arrivaldate.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{returnJourney.arrivalDate}"  >
		                           <f:convertDateTime pattern="dd/MM/yyy" timeZone="#{editViewInternationalProjectAssignmentBean.defaultTimeZone}"/>
                </h:outputText> 
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{returnJourney.arrivalDate}"  style="width:100%"> 
		                           <f:convertDateTime pattern="dd/MM/yyy" timeZone="#{editViewInternationalProjectAssignmentBean.defaultTimeZone}"/>
                </h:inputText> 
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
					
						<p:column  headerText="#{msg['arrivaltime.label']}" >
					  <p:cellEditor>  						
						<f:facet name="output">  
		                    <h:outputText value="#{returnJourney.arrivalTime}"  >
		                           <f:convertDateTime pattern="HH:mm" timeZone="#{editViewInternationalProjectAssignmentBean.defaultTimeZone}" />
                </h:outputText> 
		                </f:facet>  
		                <f:facet name="input">  
		                    <h:inputText value="#{returnJourney.arrivalTime}"  style="width:100%">  
		                           <f:convertDateTime pattern="HH:mm" timeZone="#{editViewInternationalProjectAssignmentBean.defaultTimeZone}"/>
                </h:inputText>
                 
		                </f:facet>  
					  </p:cellEditor>
					</p:column>
       
            
            			
			<p:column headerText="Operation">  
              <p:commandButton icon="ui-icon-close" title="Remove from list"
				actionListener="#{editViewInternationalProjectAssignmentBean.removeFromReturnJourneyList}"
				update="@form" style="padding: 0"/>	
			 </p:column>  
  </p:dataTable>  
    </p:outputPanel>
    <p:panel header="#{msg['visadetials.label']}" style="border: 1px solid #d9d9d9; width:100%">
	    <h:panelGrid columns="6" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">
	
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['visanumber.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText maxlength="20" id="visaNumber" value="#{editViewInternationalProjectAssignmentBean.visa.VISANumber}" />
				
				
				
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['validupto.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:calendar showButtonPanel="true" value="#{editViewInternationalProjectAssignmentBean.visa.validUpto}"/>
				
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['type.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText value="#{editViewInternationalProjectAssignmentBean.visa.type}"/>
				
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['country.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText  value="#{editViewInternationalProjectAssignmentBean.visa.country}"/>
				</h:panelGrid>
			    </p:panel>
          <p:panel header="#{msg['insurancedetails.label']}" style="border: 1px solid #d9d9d9; width:100%">
	    <h:panelGrid columns="6" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['provider.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText value="#{editViewInternationalProjectAssignmentBean.visa.insuranceProvider}"/>
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['policynumber.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText maxlength="20" id="insuranceProvider" value="#{editViewInternationalProjectAssignmentBean.visa.insurancePolicyNumber}" />
			
				
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
				<h:outputLabel value="#{msg['validityfrom.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:calendar showButtonPanel="true" value="#{editViewInternationalProjectAssignmentBean.visa.validFrom}"/>
				
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
				<h:outputLabel value="#{msg['validityto.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:calendar showButtonPanel="true" value="#{editViewInternationalProjectAssignmentBean.visa.validTo}"/>
				
			    </h:panelGrid>
			    </p:panel>
                 <p:panel header="#{msg['assignmentallowancedetails.label']}" style="border: 1px solid #d9d9d9; width:100%">
	    <h:panelGrid columns="4"  cellspacing="3">
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['wcccardnumbankaccnum.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText maxlength="20"  id="wccCardNumbankAccNum" value="#{editViewInternationalProjectAssignmentBean.visa.WCCNumber}" />
				
				<h:inputHidden />
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['dailyallowance.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputMask mask="99999.99" id="dailyAllowance" value="#{editViewInternationalProjectAssignmentBean.visa.dailyAllowance}"  >
			<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
                             <p:watermark for="dailyAllowance" value="00000.00" />
                            </p:inputMask>
					<p:selectOneMenu value="#{editViewInternationalProjectAssignmentBean.visa.dailyAllowanceCurrency}" style="width:140px;">
					    <f:selectItem itemLabel="INR" itemValue="INR" />
						<f:selectItem itemLabel="USD" itemValue="USD" />
						<f:selectItem itemLabel="EURO" itemValue="EURO" />
					</p:selectOneMenu>
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['loadedtocard.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputMask mask="99999.99" id="loadedToCard" value="#{editViewInternationalProjectAssignmentBean.visa.iodCard}"  >
				<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
                            <p:watermark for="loadedToCard" value="00000.00" />
                            </p:inputMask>
				<p:selectOneMenu value="#{editViewInternationalProjectAssignmentBean.visa.iodCardCurrency}" style="width:140px;">
					    <f:selectItem itemLabel="INR" itemValue="INR" />
						<f:selectItem itemLabel="USD" itemValue="USD" />
						<f:selectItem itemLabel="EURO" itemValue="EURO" />
					</p:selectOneMenu>
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
			<h:outputLabel value="#{msg['cashgivenonhand.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputMask mask="99999.99" id="cashGivenOnHand" value="#{editViewInternationalProjectAssignmentBean.visa.cashGivenInHand}"  >
					<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
                            <p:watermark for="cashGivenOnHand" value="00000.00" />
                            </p:inputMask>
				<p:selectOneMenu value="#{editViewInternationalProjectAssignmentBean.visa.cashGivenInHandCurrency}" style="width:140px;">
					    <f:selectItem itemLabel="INR" itemValue="INR" />
						<f:selectItem itemLabel="USD" itemValue="USD" />
						<f:selectItem itemLabel="EURO" itemValue="EURO" />
					</p:selectOneMenu>
				<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputLabel value="#{msg['paymentcycle.label']}"/>
		</h:panelGroup>
				<h:outputLabel value=" : " />
				<p:inputText  value="#{editViewInternationalProjectAssignmentBean.visa.payCycle}"/>
				<h:inputHidden />
				
			    </h:panelGrid>
			    </p:panel>
			    <p:panel header="#{msg['generalinstructions.label']}" style="border: 1px solid #d9d9d9; width:100%">
			    <h:panelGrid columns="1" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">
				<h:outputLabel value="1. Timings and holiday calander of the client would be applicable."/>
				<h:outputLabel value="2. Any travel or expenses not related to business will not be reimbursed."/>
				<h:outputLabel value="3. Any travel or expenses should have prior approval of competent authority."/>
				<h:outputLabel value="4. During the assignment your salary will be remitted to your salary account."/>
				<h:outputLabel value="5. During the assignment you will not indulge in any activity of disrepute to either client or to our organization and any such activity/act will attract disciplinary action."/>
				<h:outputLabel value="6. You are not expected to leave the site without written consent of client/project manager."/>
				<h:outputLabel value="7. You will abide to the Employee Confidentiality and Non-disclosure agreement."/>
				<h:outputLabel value="8. Please monitor your allowance payment due date,visa expiry,passport expiry and insurance expiry and inform HR as required."/>
				<h:outputLabel value="9. your escalation point for this assignment would be C.Srinivas Reddy,Center Head,Hyderabad."/>
				<h:outputLabel value="10. Cash given on hand and the currency loaded into the card will be adjusted against the perdiems."/>
				<h:outputLabel value="11. Local conveyance needs supporting bills."/>
				<h:outputLabel value="12. To settle the bills within 7 days of return to the base location."/>
				
				
			    </h:panelGrid>
			    </p:panel>
			     <p:panel header="#{msg['specialinstructions.label']}" style="border: 1px solid #d9d9d9; width:100%">
			    <h:panelGrid columns="2" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">
				<h:outputLabel value="#{msg['travelhelp.label']}"/>
				<h:outputLabel value=" : " />
				<h:outputLabel value="#{msg['technicalsupport.label']}"/>
				<h:outputLabel value=" : " />
				<h:inputHidden />
				<h:inputHidden />
				<h:outputLabel value="#{msg['otherhelp.label']}"/>
				<h:outputLabel value=" : " />
				
		         </h:panelGrid>
		         <h:panelGrid columns="6" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">
				<h:outputLabel value="#{msg['otherhelp.label']}"/>
				<h:outputLabel value=" : " />
				<h:inputHidden />
				<h:inputHidden />
				<h:inputHidden />
				<h:outputLabel value="#{msg['localconveyanceneedssupportingbills.label']}"/>
		         </h:panelGrid>
			    </p:panel>
    </h:panelGrid>
    
      <h:panelGrid columns="1" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="width:100%" cellspacing="3">
		<h:panelGroup style="float:right;">
		<p:commandButton id="updateButton" update="growl" rendered="#{editViewInternationalProjectAssignmentBean.renderUpdate}" value="Update" action="#{editViewInternationalProjectAssignmentBean.updateInternationalProjectAssignment}" />
		<p:commandButton id="updateDisableButton" rendered="#{editViewInternationalProjectAssignmentBean.renderDisableUpdate}" update="growl" value="Update" action="#{editViewInternationalProjectAssignmentBean.updateInternationalProjectAssignment}" disabled="true" />       	
		<p:commandButton value="Back" onclick="history.back();" />
		        	</h:panelGroup>
	 </h:panelGrid>
		</h:form>
	</ui:define>
</ui:composition>

